using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Ant1.Objects;

namespace Ant1
{
    public partial class Form1 : Form
    {
        private int x;
        private GameManager gm;
        public Form1()
        {
            InitializeComponent();

            x = 0;
            gm = new GameManager();
            gm.AddObject(new TestMove());
            gm.BoardX = this.Width-50;
            gm.BoardY = this.Height-50;
        }

        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            x++;


            //Display Debug Info
            Font myFont = new Font("Times", 30, FontStyle.Regular, GraphicsUnit.Pixel);
            e.Graphics.DrawString(gm.DebugInfo, myFont, Brushes.Black, new PointF(0, 0));
            e.Graphics.DrawString(x.ToString(), myFont, Brushes.Black, new PointF(0, 20));

            //Display dot for objects
            gm.Display(e);

        }

        private void timer1_Tick(object sender, EventArgs e)
        {

            gm.Tick();
            this.Invalidate();
        }
    }
}